package com.jimmy.medical.repository;

import com.jimmy.medical.entity.Recharge;
import com.jimmy.medical.entity.RechargeServiceItem;
import com.jimmy.medical.entity.ServiceItem;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface RechargeServiceItemRepository extends JpaSpecificationExecutor<RechargeServiceItem>, PagingAndSortingRepository<RechargeServiceItem, Long> {

    RechargeServiceItem findFirstByRecharge(Recharge recharge);

    RechargeServiceItem findFirstByRechargeAndItem(Recharge recharge, ServiceItem item);
}
